Graphical modeling environments, such as the technical computing environment of MATLAB® from the MathWorks, Inc. of Natick, Mass., can provide a “model-based design” approach to designing an implementation, such as for embedded computational hardware. The term “model-based design” is used to refer to a graphical model acting as a design. A model-based design may be used as a design specification for an implementation, such as an implementation of an algorithm in hardware circuitry or the implementation of code to run on a microprocessor. A graphical block diagram modeling environment can produce designs in block diagram form to specify computations that can be performed on computational hardware such as a general purpose processor, microcontroller, DSP, FPGA, PLD, or ASIC.
As a design specification, a model-based design can drive the building process of an implementation of the design. For instance, the model-based design can act as a specification from which to automatically generate code from a block diagram model. For a design that represents a computation to perform on a single component, such as a processor, the code implementation of the design can be relatively straightforward. However, a block diagram model may represent a design for implementation on a computational hardware device that may comprise a multiple component heterogeneous topology, for example, an embedded control system with multiple different microprocessors and FPGAs. In another case, a block diagram model design which may be implemented in code to run on a single processor, instead may be targeted to run on a multiple component computational hardware for a variety of design reasons, such as quality, cost, speed, size, etc. In these types of cases, it is much more challenging and difficult to generate an implementation, such as generating code, from a model-based design as the implementation is dependent on the topology of the hardware. Multiple component computational hardware can be designed with various topologies, and can have multiple processors with multiple integrated circuit (ICs) devices, such as FPGAs, PLDs and ASICs. Additionally, the computational hardware may comprise a heterogeneous topology consisting of different types of processors and IC components.
Moreover, with the wide range of possible combinations of processor and IC components that can be designed into hardware, implementation of a model-based design is further complicated as these components can also be interfaced together by a wide range of different types of physical, communication and control interfaces. For example, the hardware may include various physical communication interfaces between components such as a serial I/O connection, parallel I/O connection, shared memory, or a FIFO queued buffer. The physical communication interfaces may require custom or specific device drivers to support communicating via the physical medium. The components can communicate over the physical communication interface to exchange data, and to control and coordinate the performance of portions of the computations across different components, or to otherwise perform inter-process communications. As such, the implementation of a design into code is further dependent on the type of physical interfaces and device drivers, type of communication and control interfaces, and the algorithms for inter-process communications.
A block diagram modeling environment, such as Simulink® from The MathWorks, Inc. of Natick, Mass., may provide block diagram models for representing a design, such as computations, algorithms and functionality that may be implemented on a target device such as a microprocessor, an embedded control system, or custom designed board. That is, the design is modeled and simulated in the block diagram modeling environment to determine and test system behavior before implementing the design physically in a target hardware device. Once the design is determined to be ready for implementation on a target device, code may automatically be generated from the block diagram model to execute on a processor of the target device. The block diagram model may represent a design that may be implemented on different types of target devices depending on various hardware design choices such as performance and cost. However, the block diagram modeling environment does not provide a model-based design approach to generating component interfaces between electronic components of a target device. Typically, implementing code for component interfaces is done manually. A model-based design approach would need to take into consideration the various types and combinations of component interfaces available in target devices, changes to the topology of a target device under design by the model, and changes in the selection of the target device. For example, in one target device there may be a processor to processor interface using shared memory and in another target device there may be a processor to IC interface using a FIFO. There may be any combination of processor-to-processor, IC-to-IC, processor-to-IC, and IC-to-processor interfaces to implement for a target device. If the topology of the target device changes, then the manually coded component interfaces would need to be manually re-implemented. As a result, the model-based design of a graphical model such as a block diagram model does not drive the process of building component interfaces and does not take into account the heterogeneous topology of multiple target devices having multiple components.
Thus, it is desirable to represent in a graphical model component interfaces between electronic components associated with a design that may be implemented in one or more target devices. Systems and methods are desired to automatically generate code from a graphical design model for the implementation of the component interfaces between electronic components of the target device.